/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package qlvbdq.gui;

/**
 *
 * @author Nguyen Vu Huy
 */
public class frmMain extends javax.swing.JFrame {

    /**
     * Creates new form frmMain
     */
    public frmMain() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        labelBackgroundTitle1 = new org.edisoncor.gui.label.LabelBackgroundTitle();
        pnlIcon = new javax.swing.JPanel();
        jXLabel1 = new org.jdesktop.swingx.JXLabel();
        jXLabel4 = new org.jdesktop.swingx.JXLabel();
        jXLabel2 = new org.jdesktop.swingx.JXLabel();
        jXLabel6 = new org.jdesktop.swingx.JXLabel();
        lbLogout = new org.jdesktop.swingx.JXLabel();
        jXLabel5 = new org.jdesktop.swingx.JXLabel();
        jXLabel7 = new org.jdesktop.swingx.JXLabel();
        jXLabel8 = new org.jdesktop.swingx.JXLabel();
        jXLabel9 = new org.jdesktop.swingx.JXLabel();
        pnlMenu = new org.jdesktop.swingx.JXPanel();
        btnBanHang = new org.edisoncor.gui.label.LabelTask();
        btnQLSP = new org.jdesktop.swingx.JXButton();
        btnQLKH = new org.jdesktop.swingx.JXButton();
        btnDichVu = new org.jdesktop.swingx.JXButton();
        btnBaoCao = new org.jdesktop.swingx.JXButton();
        btnThuTienNo = new org.jdesktop.swingx.JXButton();
        jXButton6 = new org.jdesktop.swingx.JXButton();
        btnThoat = new org.jdesktop.swingx.JXButton();
        pnlFunction = new org.jdesktop.swingx.JXPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("PHẦM MỀM QUẢN LÝ CỬA HÀNG VÀNG BẠC ĐÁ QUÝ");
        setBackground(new java.awt.Color(204, 204, 255));
        setUndecorated(true);
        setResizable(false);

        pnlIcon.setBackground(new java.awt.Color(204, 204, 255));
        pnlIcon.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pnlIcon.setLayout(null);

        jXLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/hiệu ứng chữ thủy tinh.png"))); // NOI18N
        pnlIcon.add(jXLabel1);
        jXLabel1.setBounds(360, 0, 560, 100);

        jXLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/gold.png"))); // NOI18N
        pnlIcon.add(jXLabel4);
        jXLabel4.setBounds(410, 70, 100, 80);

        jXLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/diamon.png"))); // NOI18N
        pnlIcon.add(jXLabel2);
        jXLabel2.setBounds(550, 70, 160, 80);

        jXLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/uit.png"))); // NOI18N
        pnlIcon.add(jXLabel6);
        jXLabel6.setBounds(10, 10, 150, 124);

        lbLogout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/logout.png"))); // NOI18N
        lbLogout.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbLogoutMouseClicked(evt);
            }
        });
        pnlIcon.add(lbLogout);
        lbLogout.setBounds(1080, 10, 90, 30);

        jXLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/ring.png"))); // NOI18N
        pnlIcon.add(jXLabel5);
        jXLabel5.setBounds(740, 70, 90, 93);

        jXLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/kim-cuong.png"))); // NOI18N
        pnlIcon.add(jXLabel7);
        jXLabel7.setBounds(180, 10, 220, 130);

        jXLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/Yoyal-Diamond.jpg_1251038452.png"))); // NOI18N
        pnlIcon.add(jXLabel8);
        jXLabel8.setBounds(830, 70, 90, 80);

        jXLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/1384421837.png"))); // NOI18N
        pnlIcon.add(jXLabel9);
        jXLabel9.setBounds(910, 40, 240, 120);

        pnlMenu.setBackground(new java.awt.Color(204, 204, 255));
        pnlMenu.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        btnBanHang.setBackground(new java.awt.Color(255, 255, 255));
        btnBanHang.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/sell.png"))); // NOI18N
        btnBanHang.setText("BÁN HÀNG");
        btnBanHang.setDescription("Lập Phiếu Bán Hàng");
        btnBanHang.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnBanHangMouseClicked(evt);
            }
        });

        btnQLSP.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/diamons.png"))); // NOI18N
        btnQLSP.setText("Quản Lý Sản Phẩm");
        btnQLSP.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnQLSP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnQLSPActionPerformed(evt);
            }
        });

        btnQLKH.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/users.png"))); // NOI18N
        btnQLKH.setText("Quản Lý Khách Hàng");
        btnQLKH.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnQLKH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnQLKHActionPerformed(evt);
            }
        });

        btnDichVu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/services.png"))); // NOI18N
        btnDichVu.setText("Dịch Vụ Khách Hàng");
        btnDichVu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnDichVu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDichVuActionPerformed(evt);
            }
        });

        btnBaoCao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/report.png"))); // NOI18N
        btnBaoCao.setText("Lập Báo Cáo");
        btnBaoCao.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnBaoCao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBaoCaoActionPerformed(evt);
            }
        });

        btnThuTienNo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/money.png"))); // NOI18N
        btnThuTienNo.setText("   Thu Chi");
        btnThuTienNo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnThuTienNo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThuTienNoActionPerformed(evt);
            }
        });

        jXButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/user-icon.png"))); // NOI18N
        jXButton6.setText("         Tài Khoản");
        jXButton6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jXButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jXButton6ActionPerformed(evt);
            }
        });

        btnThoat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/qlvbdq/images/exit.png"))); // NOI18N
        btnThoat.setText("  Thoát");
        btnThoat.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btnThoat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThoatActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlMenuLayout = new javax.swing.GroupLayout(pnlMenu);
        pnlMenu.setLayout(pnlMenuLayout);
        pnlMenuLayout.setHorizontalGroup(
            pnlMenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(btnBanHang, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addGroup(pnlMenuLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlMenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnQLSP, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnDichVu, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnThuTienNo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jXButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnBaoCao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnQLKH, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnThoat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlMenuLayout.setVerticalGroup(
            pnlMenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMenuLayout.createSequentialGroup()
                .addComponent(btnBanHang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnQLSP, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnQLKH, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnDichVu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnBaoCao, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnThuTienNo, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jXButton6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnThoat, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlFunction.setBackground(new java.awt.Color(204, 204, 255));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlMenu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(pnlFunction, javax.swing.GroupLayout.PREFERRED_SIZE, 967, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(pnlIcon, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlFunction, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlMenu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnThoatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThoatActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnThoatActionPerformed

    private void btnQLSPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQLSPActionPerformed
        // TODO add your handling code here:
       pnlFunction.removeAll();
       pnlFunction.repaint();
       pnlFunction.invalidate();
        pnlFunction.add(new pnlQLSP());
        pnlFunction.validate();
         //pnlQLSP pnl = new pnlQLSP();
        //pnlFunction.add(pnl);
    }//GEN-LAST:event_btnQLSPActionPerformed

    private void btnQLKHActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQLKHActionPerformed
        /*pnlFunction.removeAll();
        pnlQLKH pnl = new pnlQLKH();
        pnlFunction.add(pnl);
        System.out.println(pnl.getX());
        System.out.println(pnl.getY());
        System.out.println(pnl.getHeight());*/
        pnlFunction.removeAll();
        pnlFunction.repaint();
        pnlFunction.invalidate();
        pnlFunction.add(new pnlQLKH());
        pnlFunction.validate();
    }//GEN-LAST:event_btnQLKHActionPerformed

    private void btnDichVuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDichVuActionPerformed
        // TODO add your handling code here:
        /*pnlFunction.removeAll();
        pnlDV pnl = new pnlDV();
        pnlFunction.add(pnl);
        
        System.out.println(pnl.getX());
        System.out.println(pnl.getY());
        System.out.println(pnl.getHeight());*/
        pnlFunction.removeAll();
        pnlFunction.repaint();
        pnlFunction.invalidate();
        pnlFunction.add(new pnlDV());
        pnlFunction.validate();
    }//GEN-LAST:event_btnDichVuActionPerformed

    private void btnBaoCaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBaoCaoActionPerformed
        // TODO add your handling code here:
        pnlFunction.removeAll();
        pnlFunction.repaint();
        pnlFunction.invalidate();
        pnlFunction.add(new pnlBaoCao());
        pnlFunction.validate();
        
    }//GEN-LAST:event_btnBaoCaoActionPerformed

    private void btnBanHangMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnBanHangMouseClicked
        pnlFunction.removeAll();
        pnlFunction.repaint();
        pnlFunction.invalidate();
        pnlFunction.add(new pnlBanHang());
        pnlFunction.validate();
    }//GEN-LAST:event_btnBanHangMouseClicked

    private void btnThuTienNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThuTienNoActionPerformed
        // TODO add your handling code here:
        pnlFunction.removeAll();
        pnlFunction.repaint();
        pnlFunction.invalidate();
        pnlFunction.add(new pnlThuChi());
        pnlFunction.validate();
    }//GEN-LAST:event_btnThuTienNoActionPerformed

    private void jXButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jXButton6ActionPerformed
        // TODO add your handling code here:
        pnlFunction.removeAll();
        pnlFunction.repaint();
        pnlFunction.invalidate();
        pnlFunction.add(new pnlTaiKhoan());
        pnlFunction.validate();
    }//GEN-LAST:event_jXButton6ActionPerformed

    private void lbLogoutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbLogoutMouseClicked
        (new frmLogin()).setVisible(true);
        this.dispose();
    }//GEN-LAST:event_lbLogoutMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new frmMain().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.edisoncor.gui.label.LabelTask btnBanHang;
    private org.jdesktop.swingx.JXButton btnBaoCao;
    private org.jdesktop.swingx.JXButton btnDichVu;
    private org.jdesktop.swingx.JXButton btnQLKH;
    private org.jdesktop.swingx.JXButton btnQLSP;
    private org.jdesktop.swingx.JXButton btnThoat;
    private org.jdesktop.swingx.JXButton btnThuTienNo;
    private org.jdesktop.swingx.JXButton jXButton6;
    private org.jdesktop.swingx.JXLabel jXLabel1;
    private org.jdesktop.swingx.JXLabel jXLabel2;
    private org.jdesktop.swingx.JXLabel jXLabel4;
    private org.jdesktop.swingx.JXLabel jXLabel5;
    private org.jdesktop.swingx.JXLabel jXLabel6;
    private org.jdesktop.swingx.JXLabel jXLabel7;
    private org.jdesktop.swingx.JXLabel jXLabel8;
    private org.jdesktop.swingx.JXLabel jXLabel9;
    private org.edisoncor.gui.label.LabelBackgroundTitle labelBackgroundTitle1;
    private org.jdesktop.swingx.JXLabel lbLogout;
    private org.jdesktop.swingx.JXPanel pnlFunction;
    private javax.swing.JPanel pnlIcon;
    private org.jdesktop.swingx.JXPanel pnlMenu;
    // End of variables declaration//GEN-END:variables
}
